import Cookies from 'js-cookie'

interface CookieOptions {
  expires?: number | Date;
  path?: string;
  domain?: string;
  secure?: boolean;
  sameSite?: 'strict' | 'lax' | 'none';
}

export function setCookie(name: string, value: string, options?: CookieOptions): void {
  Cookies.set(name, value, options)
}

export function getCookie(name: string): string | undefined {
  return Cookies.get(name)
}

export function removeCookie(name: string, options?: CookieOptions): void {
  Cookies.remove(name, options)
}
